package com.eapt.query;

import java.util.List;

import com.eapt.base.EAPTBaseQuery;
import com.eapt.vo.EdsLogis;

public class EdsLogisQuery extends EAPTBaseQuery {

	public EdsLogisQuery() {
		super(EdsLogis.class);
	}
	
	public void setEdslogisno(Long val) {
		setEQCondition("edslogisno", val);
	}
	
	public void setOutshiptono(Long val) {
		setEQCondition("outshiptono", val);
	}
	
	public void setCno(String val) {
		setEQCondition("cno", val);
	}
	
	public void setShipto(String val) {
		setEQCondition("shipto", val);
	}
	
	public void setOutshiptono(List<Long> val) {
		setINCondition("outshiptono", val);
	}
	
	public void setShipto(List<Long> val) {
		setINCondition("shipto", val);
	}
	
	public void setDate(String start, String end) {
		this.setBETWEENCondition("ordercreatedate", start, end);
	}
	
	public static EdsLogis loadByNo(Long val) {
		if (val == null)
			throw new com.stony.core.exception.ErrorException();

		EdsLogisQuery query = new EdsLogisQuery();
		query.setEdslogisno(val);
		query.execute();

		if (query.getResults().size() == 0) {
			return null;
		} else {
			return (EdsLogis) query.getResults().get(0);
		}
	}

}
